<template>
  <div>
    <div v-for="(el,index) in imgList" :key="index"  class="first_pic_relative">
      <img class="landing-page-img-list" :src="el">
      <div v-if="index===0">
        <div class="free_open_position" @click="freeOpen">免费开通</div>
        <div class="free_open_position_trial " @click="toUse">已开通，前往使用></div>
      </div>
    </div>


    <div style="height:40px"></div>
    <div class="propaganda_footer flex_between">
      <div @click="UnderstandTheConsulting">
        了解咨询
      </div>
      <div @click="freeOpen">
        免费开通
      </div>
    </div>

    <van-overlay :show="show" @click="show = false">
      <div class="wrapper" @click.stop>
        <div class="block" @click="confirm">
          <span> 微信扫码联系客服 </span>

          <img class="qr_service" src="/web-hft-ee/static/img/landing-page/gh_8d2787825a44_344.jpg">

          <p class="flex_center" style="margin: 8px">
            <img src="/web-hft-ee/static/img/landing-page/phone.png">
            <a :href="'tel:' + tel">{{ tel }} </a>
          </p>
          <div>知道了</div>
        </div>
      </div>
    </van-overlay>

  </div>
</template>

<script>
import {SiteDirectory} from '../../../repo/env/Constants'

export default {
  name: 'landing.vue',
  data () {
    return {
      tel: 13715109802,
      show: false,
      imgList: [
        '/web-hft-ee/static/img/landing-page/landing_page1.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page2.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page3.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page4.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page5.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page6.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page7.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page8.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page9.jpg',
        '/web-hft-ee/static/img/landing-page/landing_page10.jpg',
      ]
    }
  },
  methods: {
    confirm () {
      this.show = false
    },
    UnderstandTheConsulting () {
      this.show = true
    },
    toUse () {
      this.$_router.push(SiteDirectory + 'tab/home')
    },
    freeOpen () {
      this.$router.push({
        name: 'package-list',
      })
    }

  }
}
</script>

<style scoped>
.propaganda_footer {
  position: fixed;
  width: 100%;
  bottom: 0px;
  text-align: center;
  line-height: 48px;
  height: 48px;
}

.propaganda_footer > div {
  width: 50%;
  background: #229FF0;
  color: white;
  font-size: 13px;
  font-weight: bold;
}

.propaganda_footer > div:nth-of-type(1) {
  background-color: white;
  color: #229FF0;
}


.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.block {
  width: 80%;
  text-align: center;
  background-color: #fff;
  position: relative;
  padding: 10px;
  border-radius: 10px;
  box-sizing: border-box;
}

.block > div {
  width: 100%;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border-top: 1px #EDEDF0 solid;
  color: #229FF0;
}

.block > p {
  color: #229FF0;
}

.block > p > img {
  /*width: 20px;*/
  height: 16px;
  margin-top: 3px;
  margin-right: 5px;
}

.qr_service {
  width: 200px;
  margin: 8px auto auto auto;
}

.landing-page-img-list {
  width: 100%;
}


.free_open_position {
  background: white;
  border-radius: 25px;
  color: #1DA1F2;;
  position: absolute;
  bottom: 29%;
  left: 5%;
  text-align: center;
  width: 96px;
  height: 32px;
  line-height: 32px;
  z-index: 2;
  font-weight: bold;
}

.free_open_position_trial {
  position: absolute;
  bottom: 12%;
  color: #FFC343;
  font-size: 12px;
  left: 5%;
}


.first_pic_relative{
  position: relative;

}


</style>
